export default function({ redirect, route, app: { $cookies } }) {
  if (route.path.startsWith("/admin") && route.path !== "/admin/login") {
    if (!$cookies.get("adminToken")) {
      redirect("/admin/login", {
        callback: route.fullPath
      });
    }
  }
}
